package com.example.voltorb.flip;


public class Tile {
	
	protected boolean isTurned;
	protected boolean isMarked;
	
	public Tile() {
		this.isTurned = false;
		this.isMarked = false;
	}
	
	public void turn() {
		this.isTurned = !this.isTurned;
	}
	
	public void toggleMarking() {
		this.isMarked = !this.isMarked;
	}
	public boolean isTurned() {
		return this.isTurned;
	}
	
	public boolean isMarked() {
		return this.isMarked;
	}
	
}

class CoinTile extends Tile {
	
	private int coinAmount;

	public CoinTile(int coins) {
		super();
		this.coinAmount = coins;
	}
	
	public int getCoinAmount() {
		return this.coinAmount;
	}

	@Override
	public void turn() {
		if (!this.isTurned)
			this.isTurned = true;
	}
	
}

class VoltorbTile extends Tile {
	
	public VoltorbTile() {
		super();
	}

	@Override
	public void turn() {
		if (!this.isTurned)
			this.isTurned = true;
	}
	
}

class SummaryTile extends Tile {
	
	private int coinAmount, voltorbs;
	
	public SummaryTile(int coins, int voltorbs) {
		this.isTurned = true;
		this.isMarked = false;
		
		this.coinAmount = coins;
		this.voltorbs = voltorbs;
	}
	
	public int getCoinAmount() {
		return this.coinAmount;
	}
	
	public int getVoltorbs() {
		return this.voltorbs;
	}

	@Override
	public void turn() {
		return;
	}

	@Override
	public void toggleMarking() {
		return;
	}
	
}